<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script>
        var arr0 = new Array("东城区", "西城区", '海淀区', '昌平区');
        var arr1 = new Array("长春市", "四平市", "辽源市", "通化市");
        var arr2 = new Array("济南市", "淄博市", "枣庄市", "日照市");
        var arr3 = new Array("石家庄", "廊坊", "唐山", "承德");
        var arr4 = new Array("南京市", "苏州市", "扬州市", "泰州市");
        //2.将所有的省份的市区数组放置一个大的数组里面 (二维数组)
        var arr = new Array(arr0, arr1, arr2, arr3, arr4);
        function selectCity(val) {
            var cid = document.getElementById("cityId");
            cid.innerHTML = ' <option value="">----请-选-择-市----</option>'
            var cities = arr[val];
            for(var i = 0;i<cities.length;i++){
                cid.innerHTML+='<option>'+cities[i]+'</option>';
            }
        }
    </script>
</head>
<body>
<select id="provinceId" onchange="selectCity(this.value)" style="width:150px">
    <option value="">----请-选-择-省----</option>
    <option value="0">北京</option>
    <option value="1">吉林省</option>
    <option value="2">山东省</option>
    <option value="3">河北省</option>
    <option value="4">江苏省</option>
</select>
<select id="cityId" style="width:150px">
    <option value="">----请-选-择-市----</option>
</select>
</body>
</html>